package event;

public class Boy implements EmotionListener{
	private String name;
	public Boy(String name){
		this.name = name;
	}
	public void happy(EmotionEvent evt){
		String lover = ((Girl)evt.getSource()).getLover();
		System.out.println(lover+",I am also happy");
	}
	public void sad(EmotionEvent evt){
		String lover = ((Girl)evt.getSource()).getLover();
		System.out.println(lover+",take care, you make me sad too.");
	}
	public static void main(String[] args) throws HeartOccupiedException{
		Girl lover = new Girl("mary");
		Boy me = new Boy("George");
		lover.setEmotionListener(me);
		lover.start();
	}
}
